extends ../layout

block main
	ul.breadcrumb
		li
			i.icon-home
		li
			i.icon-angle-right
		li
			a(href="/") 面板


	div(class="row-fluid sortable")
		div(class="box span12")
			div(class="box-header", data-original-title)
				h2
					i(class="halflings-icon user")
					span.break
					| 消息

			div.box-content
				table(class="table table-striped table-bordered bootstrap-datatable datatable")
					thead
						tr
							th 发送人
							th 接受人
							th 标题
							th 时间
							th 状态
					tbody
						- var states = ['未读', '已读'];
						- each message in messages
							tr
								td
									a(href="/customers/#{message.get('customer_id')}", target="_blank") #{message.get('customer_id')}
								td
									a(href="/customers/#{message.get('receiver_id')}", target="_blank") #{message.get('receiver_id')}
								td= message.get('title')
								td= moment(message.updatedAt).format()
								td= states[message.get('state')]
